<template>
	<view class="count">
		<view class="swiper">
			<u-swiper :effect3d="true" :autoplay="false" @change="changeFn" height="526" :list="list"></u-swiper>
		</view>
		<view class="title">
			{{list[curren].type}}
		</view>
		<view class="cont">
			{{list[curren].title}}
		</view>
		<view @click="comfig" class="btn">
			确认
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						image: '/static/swip.png',
						title: ' （理想体重40%以下）肋骨，腰椎和盆骨清晰可见；细颈和窄腰，腹部内收明显；腹侧赘肉无脂肪，腹侧线消失。',
						type: '瘦型'
					},
					{
						image: '/static/swip.png',
						title: ' 肋骨可触及但不可见；俯视观可看到肋骨后略有腰线；腹部赘肉出现，腹侧线出现。',
						type: '理想体重'
					},
					{
						image: '/static/swip.png',
						title: '（理想体重40%以上）肋骨不容易触及并覆盖过多脂肪；腹部圆润；俯视观腰部几乎不可见腰部曲线；明显的异常脂肪。',
						type: '肥胖'
					}
				],
				curren: 0
			}
		},
		methods: {
			// /这个是点击确认
			comfig() {
				uni.setStorageSync('content', {
					con: this.list[this.curren].title,
					type: this.list[this.curren].type
				})
				uni.navigateBack()
			},
			changeFn(e) {
				console.log(e, '22222222222');
				this.curren = e
			}
		}
	}
</script>

<style lang="scss" scoped>
	.btn {
		width: 352rpx;
		height: 96rpx;
		line-height: 96rpx;
		background: $brown;
		border-radius: 48rpx;
		margin-left: 50%;
		transform: translateX(-50%);
		font-size: 32rpx;
		font-family: PingFang SC, PingFang SC-500;
		font-weight: 500;
		text-align: center;
		color: #ffffff;
		margin-top: 60rpx;
	}

	.cont {
		width: 606rpx;
		font-size: 28rpx;
		font-family: PingFang SC, PingFang SC-400;
		font-weight: 400;
		text-align: CENTER;
		margin-left: 50%;
		transform: translateX(-50%);
		margin-top: 18rpx;
		color: #6a5f55;

	}

	.title {
		font-size: 40rpx;
		font-family: PingFang SC, PingFang SC-600;
		font-weight: 600;
		text-align: center;
		margin-top: 64rpx;
		color: $hei;
	}

	.swiper {
		width: 100%;
		height: 526rpx;
		margin-top: 30rpx;
	}
</style>